home *** CD-ROM | disk | FTP | other *** search
/ User's Choice Windows CD / User's Choice Windows CD (CMS Software)(1993).iso / utility2 / wine02bx.zip / LISP / CALENDAR / APPT.ELC next >
Text File  |  1993-03-28  |  12KB  |  130 lines

  1. ;;; compiled by jwz@thalidomide on Sat Jan  9 00:03:29 1993
  2. ;;; from file /cadillac-th/jwz/emacs19/lisp/calendar/appt.el
  3. ;;; emacs version 19.4.1 Lucid.
  4. ;;; bytecomp version 2.09; 29-dec-92.
  5. ;;; optimization is on.
  6. ;;; this file uses opcodes which do not exist in Emacs18.
  7.  
  8. (if (and (boundp 'emacs-version)
  9.      (or (and (boundp 'epoch::version) epoch::version)
  10.          (string-lessp emacs-version "19")))
  11.     (error "This file was compiled for Emacs19."))
  12.  
  13. (byte-code "└┴!ê└┬!ç" [require calendar diary] 2)
  14. (defvar appt-issue-message t "\
  15. *If T, the diary buffer is checked for appointments.  For an
  16.  appointment warning to be made, the time must be the first thing on
  17.  the line.")
  18. (defvar appt-msg-countdown-list '(20 15 10 5 3 1) "\
  19. *A list of the intervals in minutes before the appointment when
  20.  the warnings will be given.  That is, if this were the list '(5 3 1),
  21.  then a notification would be given five minutes, three minutes, and
  22.  one minute before the appointment.")
  23. (defvar appt-check-time-syntax nil "\
  24. *Whether all diary entries are intended to beging with time specifications.
  25. Appt will beep and issue a warning message when encountering unparsable 
  26. lines.")
  27. (defvar appt-audible t "\
  28. *Controls whether appointment announcements should beep.")
  29. (defvar appt-display-mode-line t "\
  30. *Controls if minutes-to-appointment should be displayed on the mode line.")
  31. (defvar appt-announce-method 'appt-window-announce "\
  32. *The name of the function used to notify the user of an impending 
  33. appointment.  This is called with two arguments, the number of minutes
  34. until the appointment, and the appointment description list.
  35.  
  36. Reasonable values for this variable are 'appt-window-announce,
  37. 'appt-message-announce, or 'appt-persistent-message-announce.")
  38. (defvar appt-time-msg-list nil "\
  39. The list of appointments for today.  Use appt-add and appt-delete
  40.  to add and delete appointments from list.  The original list is generated
  41.  from the today's diary-entries-list. The number before each time/message
  42.  is the time in minutes after midnight.")
  43. (defconst max-time 1439 "\
  44. 11:59pm in minutes - number of minutes in a day minus 1.")
  45. (byte-code "└└ç" [-1 appt-check-tick] 1)
  46. (fset 'appt-message-announce #[(min-to-app appt) "└    ┬=½â├¬æ─┼    ë╞=½â╟¬ü╚    A@$!ç" [message min-to-app 0 "App't NOW." format "App't in %d minute%s -- %s" 1 "" "s" appt] 6 "\
  47. Set appt-announce-method to the name of this function to cause appointment
  48. notifications to be given via messages in the minibuffer."])
  49. (fset 'appt-persistent-message-announce #[(min-to-app appt) "┴=½ê┬├ A@\"¬É┬┼ë╞=½â╟¬ü╚ A@$╔ ╩ =   ¼àè═ïê) ¡ä ╟ÿ?¡à╬╧ \"*ç" [min-to-app 0 format "App't NOW -- %s" appt "App't in %d minute%s -- %s" 1 "" "s" selected-window minibuffer-window in-echo-area-already str ((byte-code "└┴ !êed|ê\ncç" [select-window minibuffer-window str] 2)) message "%s"] 5 "\
  50. Set appt-announce-method to the name of this function to cause appointment
  51. notifications to be given via messages in the minibuffer, but have those 
  52. messages stay around even if you type something (unlike normal messages)."])
  53. (defvar appt-display-duration 5 "\
  54. *The number of seconds an appointment message is displayed in its own 
  55.  window if appt-announce-method is 'appt-window-announce.")
  56. (fset 'appt-window-announce #[(min-to-app appt) "└┴!êè┬ï)ç" [require electric ((byte-code "└ ┴┬├ !8U¼å─ ê┼ êp╞╔Ä╩╦!q╠╬=½â╧¬ì╨ë╤=½â╥¬ü╙Q╘╒╓ ╫╪O!ë┌V½å┌Z¬é█╓ ▄▌O┌W½â▐¬ü▀R)α░!Γ!êπ$A@!êσµ!!êτ╞!êΦ)!+ç" [screen-height 3 window-edges selected-window appt-select-lowest-window split-window nil appt-disp-buf this-buffer ((byte-code "½ä┴!ê┴ç" [appt-disp-buf kill-buffer] 2)) get-buffer-create "*appt-buf*" "-------------------- Appointment " min-to-app 0 "NOW" "in " 1 " minute" " minutes" ". (" string-to-int current-time-string 11 13 h 12 ":" 14 16 "am" "pm" ") %-" mode-line-format pop-to-buffer insert-string appt shrink-window-if-larger-than-buffer get-buffer-window set-buffer-modified-p sit-for appt-display-duration] 9))] 2 "\
  57. Set appt-announce-method to the name of this function to cause appointment 
  58. notifications to be given via messages in a pop-up window.  The variable
  59. appt-display-duration controls how long this window should be left up."])
  60. (byte-code "└┴!¼é┬┬ç" [boundp appt-screen-defaults nil] 2)
  61. (fset 'appt-screen-announce #[(min-to-app appt) "è└┴!q├ ê─╞=½â╟¬î╚ë╔=½â╩¬ü╦Q╠═╬ ╧╨O!ë╥V½å╥Z¬é╙╬ ╘╒O╥W½â╓¬ü╫R)╪░┌A@!ê▄▌▐ed\"▀\\^] ßΓ!½ó\"½₧π $σ\"!êµ\"!êτ !êΦ╞!êσ$!)¬ÅΘΩ+∞α BD\"!ë\"*ç" [get-buffer-create "*appt-buf*" appt-disp-buf erase-buffer "-------------------- Appointment " min-to-app 0 "NOW" "in " 1 " minute" " minutes" ". (" string-to-int current-time-string 11 13 h 12 ":" 14 16 "am" "pm" ") %-" mode-line-format insert-string appt 10 20 count-lines 2 height boundp appt-disp-screen selected-screen s select-screen make-screen-visible set-screen-height sit-for x-create-screen append appt-screen-defaults (width . 80)] 9 "\
  62. Set appt-announce-method to the name of this function to cause appointment 
  63. notifications to be given via messages in a pop-up screen."])
  64. (fset 'appt-select-lowest-window #[nil "└ ┬ AAA@─ ╞¡¡╚     ╩┬    !8  W½å     ╠    !ê    =½ç╠    !ê═*¬O+ç" [selected-window lowest-window window-edges bottom-edge previous-window last-window t window-search next-window this-window 3 next-bottom-edge select-window nil] 3 "\
  65.  Determines which window is the lowest one being displayed and 
  66. selects that one."])
  67. (defvar appt-mode-line-string "" "\
  68. *The string displayed in the mode line by the appointment package.")
  69. (fset 'appt-display-mode-line #[(min-to-app) "½Ö    ½û    ┬=½â├¬Å─    ë┼=½â╞¬ü╟Q¬ü╚    ½ª\n¼ç╚╔D\n¬¢\n;½ê\n╔D\n¬Ä╔\n>¼ê╦\n╔C\"\nè╠ qê)═╬ !ê╧┬!ç" [appt-display-mode-line min-to-app 0 "App't NOW " "App't in " 1 " minute  " " minutes " "" appt-mode-line-string global-mode-string append other-buffer set-buffer-modified-p buffer-modified-p sit-for] 4 "\
  70. Add an appointment annotation to the mode line."])
  71. (fset 'appt-convert-time #[(time2conv) "└┴\n\"½é├ç└─\n\"½é┼ç├ë└╚\n\"¼à╔╩\n\"ê╦\n╠ö╠òO!═ö½è╦\n═ö═òO!╬ö½▓├U¼å╧V½à╔╨\n\"ê└╤\n╬ö╥O\"½ï╧U½æ├¬î╧W½å╧\\╙V½à╔╘\n\"ê╒_\\*ç" [string-match "^[     ]*midni\\(ght\\|te\\)[     ]*\\'" time2conv 0 "^[     ]*noon[     ]*\\'" 720 min hr "\\`[     ]*\\([0-9][0-9]?\\)[     ]*\\(:[     ]*\\([0-9][0-9]\\)\\)?[     ]*\\(am\\|pm\\)?" error "unparsable time \"%s\"" string-to-int 1 3 4 12 "mixing 12hr and 24 hr time!  %s" "am" nil 59 "minutes outa bounds - %s" 60] 5 "\
  72.  Convert hour:min[am/pm] format to minutes from midnight."])
  73. (fset 'appt-current-time-in-seconds #[nil "└ ┬    ├─O!┬    ╞╟O!╔_\\+ç" [current-time-string str string-to-int 11 13 hour 14 16 min 60] 4 "\
  74. returns the current time in seconds since midnight."])
  75. (byte-code "└┴Mê┬├Mç" [appt-sort-list #[(appt-list) "└┴\n!├\"ç" [sort copy-sequence appt-list #[(x y) "@@    @@Wç" [x y] 2]] 3] appt-diary-entries #[nil "└┴ë┼╞!ê+ç" [(appt-make-list) nil diary-list-include-blanks diary-display-hook list-diary-entries-hook diary 1 appt-time-msg-list] 3]] 2)
  76. (fset 'appt-initialize #[nil "└ ê┴ Gë├U½à─┼!¬É\n╞U½à─╟!¬å─╚╔\n\"!)ç" [install-display-time-hook appt-diary-entries n 0 message "no appointments today." 1 "1 appointment today." format "%d appointments today."] 5 "\
  77.  Read your `diary-file' and remember today's appointments.  Call this from 
  78.  your .emacs file, or any time you want your .diary file re-read (this happens 
  79.  automatically at midnight to move to notice the next day's appointments).
  80.  
  81.  The time must be at the beginning of a line for it to be put in the 
  82.  appointments list.
  83.                02/23/89
  84.                   12:00pm    lunch
  85.                 Wednesday
  86.                   10:00am    group meeting"])
  87. (fset 'appt-make-list #[nil "└\nâì\n└ë½∙┼╞  @@\"½≡ @A@╚╔\"½╡╩ò ╠ö╠òO╠ò O╧!C └O╤QCB B,¬D½ú╚╙\"½£╘ ê╒╓╠ö╠òO\"ê╫╪!ê╩ò└O¬]) Aë¼┘ ƒ    \"*┌    !█     @@@    ½òW½Ä    Aë½p    @@@¬h*    ç" [nil appt-time-msg-list diary-entries-list new-appts entry-list calendar-date-equal calendar-current-date time-string string-match "\\`[     \n]*\\([0-9]?[0-9]\\(:[0-9][0-9]\\)?[     ]*\\(am\\|pm\\)?\\|noon\\|midnight\\|midnite\\).*$" 0 eol 1 appt-time-string appt-msg-string appt-convert-time appt-time ":" appt-check-time-syntax "\n*\\([^\n]+\\)$" beep message "Unparsable time: %s" sit-for 3 append appt-sort-list appt-current-time-in-seconds appt-comp-time cur-comp-time] 6 "\
  88. Don't call this directly; call appt-initialize or appt-diary-entries."])
  89. (fset 'appt-beep #[nil "¼é┴纽Æë├V¡ë─ ê\nSë¬s)ç:½í@A:½â@\n├V¡ì─ ê╞!ê\nSë¬o*ç─ ç" [appt-audible nil i 0 beep j sleep-for-millisecs] 3])
  90. (fset 'appt-check #[nil "àε┴┬┼ ëUV        ½â╩ ê âΩ @@@ë Z ½ÿ W½æ Aë ½m @@@ ¬d ═╬\"W½ù═╬\"\\V½èTZ╤ ═╬\"V½à╥╤!¬τ¼ï ╙U¼ë >¼â╤¬╒ ╙U½ú╘╒ @A@\"½Ö @A@╙òS╤O╤╫╪Å┌!*¬¡ ═╬\"X½í ╙Y½£█ ê  @\"ê╥ !ê ╙U¡ï Aë ¬â╥╤!)¬â╥╤!-ç" [appt-issue-message -1 "" new-time min-to-app appt-current-time-in-seconds cur-comp-time appt-check-tick shut-up-this-time turnover-p appt-diary-entries appt-time-msg-list appt-comp-time apply max appt-msg-countdown-list max-time nil appt-display-mode-line 0 string-match "%%(" list-string (read list-string) ((error (byte-code "└ ê┴┬ @A@\"ê─┼!ê╞ç" [ding message "Appt: error reading from \"%s\"" appt-time-msg-list sit-for 2 nil] 3))) form eval appt-beep appt-announce-method] 5 "\
  91. Check for an appointment and update the mode line and minibuffer if
  92.  desired. Note: the time must be the first thing in the line in the diary
  93.  for a warning to be issued.
  94.   The format of the time can be either 24 hour or am/pm.  Example: 
  95.  
  96.                02/23/89
  97.                  18:00 Dinner
  98.               Thursday
  99.                 11:45am Lunch meeting.
  100.   
  101.  The following variables control the action of the notification:
  102.  
  103.  appt-issue-message        If this variable is nil, then the code in this
  104.                 file does nothing.
  105.  appt-msg-countdown-list    Specifies how much warning you want before 
  106.                 appointments.
  107.  appt-audible            Whether to beep when it's notification-time.
  108.  appt-display-mode-line        Whether to display a countdown to the next 
  109.                 appointment in the mode-line.
  110.  appt-announce-method       The function used to do the notifications.
  111.                 'appt-window-announce to do it in a pop-up
  112.                 window, 'appt-message-announce or 
  113.                 'appt-persistent-message-announce to do it 
  114.                 in the echo-area.
  115.  appt-display-duration      If appt-announce-method is set to the function
  116.                 'appt-window-announce, this specifies how many
  117.                 seconds the pop-up window should stick around.
  118.  
  119.  This function is run from the `loadst' or `wakeup' process for display-time.
  120.  Therefore, you need to have (display-time) in your .emacs file."])
  121. (fset 'appt-add #[(new-appt-time new-appt-msg) "└┴\n\"¼ä├─!ê\n┼Q╚\n!Cë    CB\n╦ \nC\" ═ !ë +ç" [string-match "[0-9]?[0-9]:[0-9][0-9]\\(am\\|pm\\)?" new-appt-time error "Unacceptable time-string" " " new-appt-msg appt-time-string appt-convert-time appt-time time-msg append appt-time-msg-list appt-sort-list] 4 "\
  122. Adds an appointment to the list of appointments for the day at TIME
  123.  and issue MESSAGE. The time should be in either 24 hour format or
  124.  am/pm format. " "sTime (hh:mm[am/pm]): \nsMessage: "])
  125. (fset 'appt-delete #[nil "    ½Ñ    @├─\nA@!┼Q╟!    A½à╔\n\"╩ +¬X╠═!)ç" [appt-time-msg-list tmp-msg-list element "Delete " prin1-to-string " from list? " prompt-string y-or-n-p test-input delq nil tmp-appt-msg-list message ""] 3 "\
  126. Deletes an appointment from the list of appointments." nil])
  127. (defvar display-time-hook nil "\
  128. *List of functions to be called when the time is updated on the mode line.")
  129. (byte-code "└┬├!¼é─┼╞Mê╟╚!ç" [appt-check display-time-hook boundp display-time-hook-installed nil install-display-time-hook #[nil "?¡├┴┬!½ƒ┴├!½Ü─┼!½ê┴╞!½â╞¬¢╟╚╔ \"½â┬¬æ├¬Ä─┼!½ê┴╩!½â╩¬ü╦ ═ KMê ╬Mê)╧ëç" [display-time-hook-installed fboundp display-time-filter-18-55 display-time-filter-18-57 featurep timer display-time-timer-function string-match "18\\.5[0-5]" emacs-version display-time-function display-time-filter old-fn old-display-time-filter #[(&rest args) "└┴\n\"ê├─!ç" [apply old-display-time-filter args run-hooks display-time-hook] 3 "Revised version of the original function: this version calls a hook."] t] 3] provide appt] 2)
  130.